#pragma once

#include <cmath>
#include <iostream>

struct point_t
{
	double x,y;
	
	point_t(double x,double y): x(x),y(y){}

	point_t(const point_t& p): x(p.x),y(p.y){}

	point_t():x(0),y(0){}
};

struct line_t
{
	point_t left,right;

	line_t(point_t& p1,point_t& p2);

	bool if_up_line();
};

struct cell_t
{
	double x,y;

	cell_t(double x,double y): x(std::floor(x)),y(std::floor(y)){}

	cell_t(const point_t& p): x(std::floor(p.x)),y(std::floor(p.y)){}
};

int turn(point_t a, point_t b, point_t c);

std::istream& operator>>(std::istream& in, point_t& p);

std::ostream& operator<<(std::ostream& out, cell_t& c);